import java.util.Scanner;

public class shuxvefenzu{
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        double[] a=new double[10];
        for (int i = 0; i <10 ; i++) {
            a[i]=in.nextDouble();
        }
        for (int i = 1; i <a.length-1 ; i++) {
            for (int j = 0; j <a.length-1 ; j++) {
                if(a[j]<a[j+1]){
                    double b=a[j];
                    a[j]=a[j+1];
                    a[j+1]=b;
                }
            }
        }
        int v=0;
        int [] e=new int[2];
        double[] b=new double[a.length];
        for (int i = 0; i <b.length-1 ; i++) {
            b[i]=a[i]-a[i+1];
        }
        for (int i = 0; i <b.length-1 ; i++) {
            for (int j = 0; j <b.length-1 ; j++) {
                if(b[j]<b[j+1]){
                    double c=b[j];
                    b[j]=b[j+1];
                    b[j+1]=c;
                }
            }
        }
        for (int i = 0; i <b.length-1; i++) {
            if(a[i]-a[i+1]==b[0]||a[i]-a[i+1]==b[1]){
                e[v]=i;
                v++;
            }
        }
        double n=0,m=0,l=0;
        for (int i = 0; i <=e[0] ; i++) {
            n=n+a[i];
        }
        for (int i = e[0]+1; i <=e[1] ; i++) {
            m=m+a[i];
        }
        for (int i = e[1]+1; i <a.length ; i++) {
            l=l+a[i];
        }
        System.out.println(l/(a.length-(e[1]+1)));
        System.out.println(m/((e[1]+1)-(e[0]+1)));
        System.out.println(n/(e[0]+1));
    }
}
